Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Dockerfile that allows efficient local builds #9

Merged
merged 2 commits into from
Apr 7, 2024

Conversation

lpenz
Copy link
Contributor

@lpenz lpenz commented Oct 7, 2023

The Dockerfile essentially builds a docker image by downloading moergo-sc/zmk and the current main branch of
moergo-sc/glove80-zmk-config, and then building the latter to warm up the image's nix store.

When running the image, very little gets downloaded, and the image just builds glove80.uf2 and copies it back to the current directory.

The provided build.sh script both builds and runs the docker image, calling docker with the appropriate arguments.

@lpenz
Copy link
Contributor Author

lpenz commented Oct 7, 2023

I've been using this Dockerfile for local builds, might as well make it available. It's mostly based on the github workflow in this repository.

The Dockerfile essentially builds a docker image by downloading
moergo-sc/zmk and the current main branch of
moergo-sc/glove80-zmk-config, and then building the latter to warm up
the image's nix store.

When running the image, very little gets downloaded, and the image
just builds glove80.uf2 and copies it back to the current
directory.

The provided `build.sh` script both builds and runs the docker image,
calling docker with the appropriate arguments.
@chrisandreae
Copy link
Collaborator

I've made some changes to make sure that builds don't end up using an old version of the firmware 'trapped' in the docker container, and to allow specifying a specific branch or tag to build against. Do these look good to you?

@lpenz
Copy link
Contributor Author

lpenz commented Apr 6, 2024

Looks good to me - tbh I'm interested in being able to do this, I have no attachment to my particular implementation

TIL RUN <<EOF, will use it in other projects

Thanks!

@chrisandreae chrisandreae merged commit 7b85d56 into moergo-sc:main Apr 7, 2024
1 check passed
@lpenz lpenz deleted the docker branch July 20, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants